<include file="../header" />

<script type="text/javascript" src="/Template/js/vue.min.js"></script>

<body class="J_scroll_fixed" id="container">
<script type="text/javascript">
    $(function() {

        $("button.btn_submit").click(function() {
            if($("input[name=agent_name]").val() == ""){
                alert("请填写【渠道商名称】");
                $("input[name=agent_name]").focus();
                return false;
            }

            $("button.btn_submit").hide();

        });

    })

</script>
<style type="text/css">
    .input{
        width: 200px;
    }
</style>
<div class="wrap jj">
    <div class="common-form">
        <form method="post" class="form-horizontal J_ajaxForm" action="{:U('FinishedProduct/editAgentPost')}">
            <fieldset>
                <input type="hidden" name="id" value="{$info.agent_id}" />
                <div class="control-group">
                    <label class="control-label">渠道商名称：</label>
                    <div class="controls">
                        <input type="text" class="input" name="agent_name" value="{$info.agent_name}">
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">联系人：</label>
                    <div class="controls">
                        <input type="text" class="input" name="agent_contact" value="{$info.agent_contact}">
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">联系电话：</label>
                    <div class="controls">
                        <input type="text" class="input" name="agent_tel" value="{$info.agent_tel}">
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">联系地址：</label>
                    <div class="controls">
                        <input type="text" class="input" name="agent_address" value="{$info.agent_address}">
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">发票抬头：</label>
                    <div class="controls">
                        <input type="text" class="input" name="agent_invoice_name" value="{$info.agent_invoice_name}">
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">发票号：</label>
                    <div class="controls">
                        <input type="text" class="input" name="agent_invoice_number" value="{$info.agent_invoice_number}">
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">发票明细：</label>
                    <div class="controls">
                        <input type="text" class="input" name="agent_invoice_detail" value="{$info.agent_invoice_detail}">
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">患者姓名必填：</label>
                    <div class="controls">
                        <select name="need_patient" style="width: auto">
                            {:getFormDictSelectOptionHtml($info['need_patient'], 'nooryes','all', 0)}
                        </select>
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">默认提货方式：</label>
                    <div class="controls">
                        <select name="delivery_type">
                            {:getFormDictSelectOptionHtml($info['delivery_type'], 'delivery_type','all', 1)}
                        </select>
                        &nbsp;可不选
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">默认付款方式：</label>
                    <div class="controls">
                        <select name="payment_type">
                            {:getFormDictSelectOptionHtml($info['payment_type'], 'payment_type','all', 1)}
                        </select>
                        &nbsp;可不选
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">默认是否开发票：</label>
                    <div class="controls">
                        <select name="need_invoice">
                            {:getFormDictSelectOptionHtml($info['need_invoice'], 'need_invoice','all', 1)}
                        </select>
                        &nbsp;可不选
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label"><a style="color: black;font-weight: bold">是否为定制渠道：</a></label>
                    <div class="controls">
                        <select name="special_agent" style="width: auto">
                            {:getFormDictSelectOptionHtml($info['special_agent'], 'nooryes','all', 0)}
                        </select>
                    </div>
                </div>
            </fieldset>
            <div class="form-actions">
                <button type="submit" class="btn btn-primary btn_submit">更新</button>
                <a class="btn" href="{:u('FinishedProduct/agentlist')}">返回</a>
            </div>
        </form>
    </div>
</div>
<script src="__ROOT__/statics/js/common.js"></script>
</body>
</html>